package com.zym.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zym.utils.EasyExcel.ExcelConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(description = "用户")
@TableName("sys_user")
public class SysUser extends BaseEntity {
	
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "用户名")
    @ExcelProperty(value = "用户名",index = 0)
	@TableField("username")
	private String username;

	@ApiModelProperty(value = "密码")
	@TableField("password")
	private String password;

	@ApiModelProperty(value = "姓名")
	@ExcelProperty(value = "姓名",index = 1)
	@TableField("name")
	private String name;

	@ApiModelProperty(value = "手机")
	@ExcelProperty(value = "手机",index = 2)
	@TableField("phone")
	private String phone;

	@ApiModelProperty(value = "头像地址")

	@TableField("head_url")
	private String headUrl;

	@ApiModelProperty(value = "部门id")
	@ExcelProperty(value = "部门id",index = 3)
	@TableField("dept_id")
	private Long deptId;

	@ApiModelProperty(value = "岗位id")
	@TableField("post_id")
	private Long postId;

	@ApiModelProperty(value = "描述")
	@TableField("description")
	private String description;

	@ApiModelProperty(value = "状态（1：正常 0：停用）")
	@ExcelProperty(value = "部门id",index = 4,converter = ExcelConverter.class)
	@TableField("status")
	private Integer status;


	//岗位
	@TableField(exist = false)
	@ExcelProperty(value = "岗位",index = 5)
	private String postName;
	//部门
	@TableField(exist = false)
	@ExcelProperty(value = "部门名称",index = 6)
	private String deptName;
}

